//mongodb node的驱动程序
const mongoose = require("mongoose");
//商品类型的数据结构
const productListSchema = new mongoose.Schema({
    navsId: { type: "ObjectId", ref: "navs" },
    tabsId: { type: "ObjectId", ref: "tabs" },
    name:String,
    count:Number,
    price:Number,
    desc:String,
    image:[String],
});
//创建model
//借助在这里创建的model操作数据库
const productListModel=mongoose.model("productList", productListSchema, "productList");
module.exports={productListModel}
